home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGNG_C / CTOASM.LZH / DEMO.C < prev    next >
Text File  |  1985-11-08  |  641b  |  36 lines

  1. extern int cadd(int);
  2. extern int cons;
  3. main(argc, argv, envp)
  4.     int argc;
  5.     char **argv;
  6.     char **envp;
  7.  
  8.     {
  9.     register char **p;
  10.     char ii;
  11.     int ccadd, ccons, ctemp;
  12.  
  13.     /* print out the argument list for this program */
  14.  
  15.     for (p = argv; argc > 0; argc--,p++) {
  16.         printf("%s\n", *p);
  17.         }
  18.  
  19.     /* test the cadd.asm linkup */
  20.  
  21.     ctemp = 100;
  22.     ccadd = cadd(ctemp);
  23.     ccons = cons;
  24.     printf("ccadd =%d\nccons =%d\n", ccadd, ccons);
  25.  
  26.     /* print out the current environment settings.  Note that
  27.      * the environment table is terminated by a NULL entry
  28.      */
  29.  
  30.     for (p = envp; *p; p++) {
  31.         printf("%s\n", *p);
  32.         }
  33.  
  34.     exit(0);
  35.     }
  36.